const Base = require('../../base.js');

module.exports = class extends Base {
  async indexAction() {
    let userInfo = await this.session('user_info')
    if (!userInfo) return this.fail(-1, '用户未登录')

    let list = await this.model('user/index').sub(userInfo._id)

    this.json({
      status: 200, message: 'success', data: list
    })
  }
};
